Skip to content

Optimize WebRTC build: Other Platforms#2947

Open
hwangsihu wants to merge 1 commit intomasterfrom
webrtc
Open

Optimize WebRTC build: Other Platforms#2947
hwangsihu wants to merge 1 commit intomasterfrom
webrtc

Conversation

@hwangsihu
Copy link
Copy Markdown
Contributor

@hwangsihu hwangsihu commented Oct 22, 2025

Build successes:

  • Windows
  • MacOS
  • Android
  • iOS
  • Ubuntu 22
  • Ubuntu 24

@hwangsihu hwangsihu requested a review from bear101 as a code owner October 22, 2025 06:47
@hwangsihu hwangsihu force-pushed the webrtc branch 2 times, most recently from 5a78b79 to 9ce5b85 Compare October 26, 2025 14:19
@hwangsihu hwangsihu force-pushed the webrtc branch 6 times, most recently from 3807948 to 4c0d9f5 Compare November 8, 2025 03:20
@hwangsihu hwangsihu marked this pull request as draft November 8, 2025 04:27
@hwangsihu hwangsihu self-assigned this Nov 8, 2025
@hwangsihu hwangsihu force-pushed the webrtc branch 9 times, most recently from b7d4b40 to 38d61dd Compare November 12, 2025 12:41
@hwangsihu hwangsihu marked this pull request as ready for review November 12, 2025 15:25
@hwangsihu hwangsihu mentioned this pull request Nov 13, 2025
@hwangsihu hwangsihu force-pushed the webrtc branch 7 times, most recently from 46a3cde to 086c1e3 Compare November 15, 2025 04:18
@hwangsihu
Copy link
Copy Markdown
Contributor Author

hmmm...

@CoBC
Copy link
Copy Markdown
Contributor

CoBC commented Feb 19, 2026

Hi,
currently I have the following errors when building from this branch:
[0:22:25] Still working on:
[0:22:25] src/third_party
21>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "--no-tags"' in C:\webrtc\Windows\src\third_party\cpuinfo\src failed; will retry after a short nap...
28>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "--no-tags"' in C:\webrtc\Windows\src\third_party\flatbuffers\src failed; will retry after a short nap...
50>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/webm/libvpx.git" "C:\webrtc\Windows\src\third_party\libvpx\source_gclient_libvpx_o1uknf1q"' in C:\webrtc\Windows failed; will retry after a short nap...
47>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git" "C:\webrtc\Windows\src\third_party\libpfm4_gclient_src_x9vpcwil"' in C:\webrtc\Windows failed; will retry after a short nap...
31>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "--no-tags"' in C:\webrtc\Windows\src\third_party\fuzztest\src failed; will retry after a short nap...
47>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress" "https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git" "C:\webrtc\Windows\src\third_party\libpfm4_gclient_src_x9vpcwil"' in C:\webrtc\Windows failed; will retry after a short nap...
61>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "--no-tags"' in C:\webrtc\Windows\src\third_party\re2\src failed; will retry after a short nap...
50>WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "--no-tags"' in C:\webrtc\Windows\src\third_party\libvpx\source\libvpx failed; will retry after a short nap...

src/third_party/libpfm4/src (ERROR)

[0:22:59] Started.
[0:22:59]

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git C:\webrtc\Windows\src\third_party\libpfm4_gclient_src_x9vpcwil' in 'C:\webrtc\Windows'

[0:23:00] Cloning into 'C:\webrtc\Windows\src\third_party\libpfm4_gclient_src_x9vpcwil'...
[0:23:19] fatal: unable to access 'https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git/': Recv failure: Connection was reset
[0:23:21]
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git C:\webrtc\Windows\src\third_party\libpfm4_gclient_src_x9vpcwil' in 'C:\webrtc\Windows' attempt 2 / 2

[0:23:21] Cloning into 'C:\webrtc\Windows\src\third_party\libpfm4_gclient_src_x9vpcwil'...
[0:23:38] fatal: unable to access 'https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git/': OpenSSL SSL_read: OpenSSL/3.5.4: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Traceback (most recent call last):
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 1415, in _Clone
self._Run(clone_cmd,
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 1762, in _Run
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
File "C:\webrtc\Windows\depot-tools\gclient_utils.py", line 733, in CheckCallAndFilter
raise subprocess2.CalledProcessError(rv, args, kwargs.get('cwd', None),
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git C:\webrtc\Windows\src\third_party\libpfm4\_gclient_src_x9vpcwil' returned non-zero exit status 128 in C:\webrtc\Windows
[0:23:42] _____ Conflicting directory found in C:\webrtc\Windows\src\third_party\libpfm4\src. Moving to C:\webrtc\Windows_bad_scm\src\third_party\libpfm4\srcorwlhvnj.

Warnings:
Conflicting directory C:\webrtc\Windows\src\third_party\libpfm4\src moved to C:\webrtc\Windows_bad_scm\src\third_party\libpfm4\srcorwlhvnj.
Traceback (most recent call last):
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 840, in update
self.current_revision = self._Clone(revision, url, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 1415, in _Clone
self._Run(clone_cmd,
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 1762, in _Run
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
File "C:\webrtc\Windows\depot-tools\gclient_utils.py", line 733, in CheckCallAndFilter
raise subprocess2.CalledProcessError(rv, args, kwargs.get('cwd', None),
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/git.code.sf.net/p/perfmon2/libpfm4.git C:\webrtc\Windows\src\third_party\libpfm4\_gclient_src_x9vpcwil' returned non-zero exit status 128 in C:\webrtc\Windows

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\coren\AppData\Local\vpython-root.0\store\cpython+gdee0q11ohi0s4eqh0uqprvov4\contents\bin\Lib\shutil.py", line 853, in move
os.rename(src, real_dst)
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable: 'C:\webrtc\Windows\src\third_party\libpfm4\src' -> 'C:\webrtc\Windows\_bad_scm\src\third_party\libpfm4\srcorwlhvnj\src'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\webrtc\Windows\depot-tools\metrics.py", line 302, in print_notice_and_exit
yield
File "C:\webrtc\Windows\depot-tools\gclient.py", line 4733, in
sys.exit(main(sys.argv[1:]))
^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient.py", line 4719, in main
return dispatcher.execute(OptionParser(), argv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\subcommand.py", line 262, in execute
return command(parser, args[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient.py", line 4055, in CMDsync
ret = client.RunOnDeps('update', args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient.py", line 2465, in RunOnDeps
work_queue.flush(revision_overrides,
File "C:\webrtc\Windows\depot-tools\gclient_utils.py", line 1045, in flush
reraise(e[0], e[1], e[2])
File "C:\webrtc\Windows\depot-tools\gclient_utils.py", line 54, in reraise
raise value
File "C:\webrtc\Windows\depot-tools\gclient_utils.py", line 1124, in run
self.item.run(*self.args, **self.kwargs)
File "C:\webrtc\Windows\depot-tools\gclient.py", line 1252, in run
self._got_revision = self._used_scm.RunCommand(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 136, in RunCommand
return getattr(self, command)(options, args, file_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 672, in wrapper
return_val = f(*args)
^^^^^^^^
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 843, in update
self._DeleteOrMove(options.force)
File "C:\webrtc\Windows\depot-tools\gclient_scm.py", line 208, in _DeleteOrMove
shutil.move(self.checkout_path, dest_path)
File "C:\Users\coren\AppData\Local\vpython-root.0\store\cpython+gdee0q11ohi0s4eqh0uqprvov4\contents\bin\Lib\shutil.py", line 873, in move
copy_function(src, real_dst)
File "C:\Users\coren\AppData\Local\vpython-root.0\store\cpython+gdee0q11ohi0s4eqh0uqprvov4\contents\bin\Lib\shutil.py", line 448, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\coren\AppData\Local\vpython-root.0\store\cpython+gdee0q11ohi0s4eqh0uqprvov4\contents\bin\Lib\shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\webrtc\Windows\src\third_party\libpfm4\src'
Running: 'C:\Users\coren\AppData\Local\vpython-root.0\store\python_venv-4g736cm314qrppedped315nn9c\contents\Scripts\python3.exe' 'C:\webrtc\Windows\depot-tools\gclient.py' root
Running: 'C:\Users\coren\AppData\Local\vpython-root.0\store\python_venv-4g736cm314qrppedped315nn9c\contents\Scripts\python3.exe' 'C:\webrtc\Windows\depot-tools\gclient.py' config --spec 'solutions = [
{
"name": "src",
"url": "https://webrtc.googlesource.com/src.git",
"deps_file": "DEPS",
"managed": False,
"custom_deps": {},
},
]
'
Running: 'C:\Users\coren\AppData\Local\vpython-root.0\store\python_venv-4g736cm314qrppedped315nn9c\contents\Scripts\python3.exe' 'C:\webrtc\Windows\depot-tools\gclient.py' sync --nohooks --with_branch_heads
Subprocess failed with return code 1.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: la build personnalisée de 'C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-mkdir.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-download.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-update.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-patch.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-configure.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-build.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-install.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\62203087b1b16fb4c69700531e3e4292\webrtc-src-complete.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\c8b056a29ea0cd029335cc17442727de\webrtc-src.rule;C:\Git\TeamTalk5\Library\TeamTalkLib\build\webrtc\CMakeLists.txt' s'est arrêtée. Code 1. [C:\Git\TeamTalk5\Build\out64\Library\TeamTalkLib\build\webrtc\webrtc-src.vcxproj]

If I try to rerun, I get:
Performing download step for 'webrtc-src'
Updating depot_tools...
Running: 'C:\Users\coren\AppData\Local\vpython-root.0\store\python_venv-4g736cm314qrppedped315nn9c\contents\Scripts\python3.exe' 'C:\webrtc\Windows\depot-tools\gclient.py' root
Your current directory appears to already contain, or be part of,
a checkout. "fetch" is used only to get new checkouts. Use
"gclient sync" to update existing checkouts.

Fetch also does not yet deal with partial checkouts, so if fetch
failed, delete the checkout and start over (crbug.com/230691).
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: la build personnalisée de 'C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-download.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-update.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-patch.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-configure.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-build.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\84cd5d4030d5e716294824560a739864\webrtc-src-install.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\62203087b1b16fb4c69700531e3e4292\webrtc-src-complete.rule;C:\Git\TeamTalk5\Build\out64\CMakeFiles\c8b056a29ea0cd029335cc17442727de\webrtc-src.rule' s'est arrêtée. Code 1. [C:\Git\TeamTalk5\Build\out64\Library\TeamTalkLib\build\webrtc\webrtc-src.vcxproj]

Do you have any idea?
Thanks

@hwangsihu
Copy link
Copy Markdown
Contributor Author

It seems like your internet connection has been disconnected. Delete the webrtc folder and try again.

@CoBC
Copy link
Copy Markdown
Contributor

CoBC commented Feb 20, 2026

Hmmm, I juste tried again now with the same error (on branch webrtc-windows). I can retry again and again, but it's strange because if I'm connecting to TeamTalk in the mean time, I don't have any packet lost, so my connection seams to be working nice.

@hwangsihu hwangsihu restored the webrtc branch February 23, 2026 12:29
@hwangsihu
Copy link
Copy Markdown
Contributor Author

Let's restore the branch to investigate the issue in #3136. Also, splitting PRs by platform doesn't seem like a good idea. Since all platforms except Windows share the same code, it causes frequent conflicts.

@hwangsihu hwangsihu reopened this Feb 23, 2026
@hwangsihu
Copy link
Copy Markdown
Contributor Author

@jeremyp3, @bear101, There seems to be a problem with commit 2b50242. When I run git revert 2b50242fe, it compiles without any problems.

@jeremyp3
Copy link
Copy Markdown
Contributor

@hwangsihu
However, I am using the webrtc-linux branch, which does not have the commit you are referring to, and I am experiencing the issue.

Which branch should I now use to compile webrtc for Linux?

@hwangsihu
Copy link
Copy Markdown
Contributor Author

Other branches, including webrtc-linux, have the changes from that commit applied.
Please revert the commit I mentioned in webrtc branch and try again.

@hwangsihu
Copy link
Copy Markdown
Contributor Author

Just reverted. Checkout to the webrtc branch and try again.

@hwangsihu
Copy link
Copy Markdown
Contributor Author

But this is really strange. Why is it that the TOOLCHAIN_BUILD_MAKEJOBS variable, which is supposed to prevent these problems, actually backfires?

@hwangsihu
Copy link
Copy Markdown
Contributor Author

Oh, I found the cause in an unexpected place. It turned out that I was bumping depot_tools to the top of DEPOTTOOLS_EXPORT, which was causing the crash. I used the Makefile Generator instead of Ninja to view the real-time output, and Ninja itself wasn't running.

@hwangsihu hwangsihu changed the title Optimize WebRTC build Optimize WebRTC build: Other Platforms Feb 24, 2026
@hwangsihu
Copy link
Copy Markdown
Contributor Author

By the way, since Android/iOS/Linux/macOS share the same code, it seems unreasonable to separate them into separate PRs.

@jeremyp3
Copy link
Copy Markdown
Contributor

@hwangsihu I just tested the webrtc branch in order to compile TeamTalk from scratch on Linux, and it build successfully without using too much RAM.

Thanks ! !

Co-Authored-By: Bjørn Damstedt Rasmussen <contact@bearware.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants